package com.hkp.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 稽核执行任务表
 * </p>
 *
 * @author HuKangPing
 * @since 2023-02-22 14:20:35
 */
@Data
@TableName("t02_task")
@ApiModel(value = "Task对象", description = "稽核执行任务表")
public class Task implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("调度作业的id")
    private Integer jobId;

    @ApiModelProperty("调度表达式")
    private String cron;

    @ApiModelProperty("执行sql")
    private String execSql;

    @ApiModelProperty("复核sql")
    private String checkSql;

    @ApiModelProperty("用于查询总数")
    private String countSql;

    @ApiModelProperty("开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty("结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @ApiModelProperty("任务执行状态，1：准备就绪，2：执行中。3：执行成功，4：执行失败")
    private String status;

    @ApiModelProperty("运行时间，毫秒数")
    private Integer runTime;


}
